package com.qiaoan.back.controller.sys;

import com.qiaoan.back.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by zhangchong on 2017/4/18.
 */
@Controller
@RequestMapping("/invalid")
public class InvalidController extends BaseController {


    @RequestMapping(value = "/session-expired", method = { RequestMethod.GET })
    public String sessionexpired(Model model, HttpServletRequest request,
                       HttpServletResponse response) throws Exception {


        return "errors/session-expired";

    }

    @RequestMapping(value = "/logintips", method = { RequestMethod.GET })
    public String loginTips(Model model, HttpServletRequest request,
                                 HttpServletResponse response) throws Exception {


        return "errors/logintips";

    }

    @RequestMapping(value = "/deny", method = { RequestMethod.GET })
    public String deny(Model model, HttpServletRequest request,
                        HttpServletResponse response) throws Exception {


        return "errors/deny";

    }


    @RequestMapping(value = "/404", method = { RequestMethod.GET })
    public String errorPath(Model model, HttpServletRequest request,
                       HttpServletResponse response) throws Exception {


        return "errors/404";

    }

    @RequestMapping(value = "/500", method = { RequestMethod.GET })
    public String error(Model model, HttpServletRequest request,
                            HttpServletResponse response) throws Exception {


        return "errors/500";

    }
}
